import React, { Component } from 'react';
import logo from '../../images/logo.png'
import './Myheader.scss'
import {withRouter} from 'react-router-dom'
class Myheader extends Component {
    goSearch(){
        this.props.history.push({pathname:'/search'})
    }
    render() {
        return (
            <div className='myHeader'>
                <div className='logo'>
                    <img src={logo} alt="" />
                </div>
                <div className='inputBox'>
                    <div className='input' onClick={()=>{this.goSearch()}}>
                        <i className='iconfont icon-fangdajing'></i>
                        <input type="text" placeholder='搜索商品'/>
                    </div>
                    <div className='btn'>
                        <i className='iconfont icon-kefu'></i>
                        <span>客服</span>
                    </div>
                </div>
            </div>
        );
    }
}

export default withRouter(Myheader);